CREATE TABLE [dbo].[Source](
	[id] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED ,
	[X] [real] NOT NULL,
	[Y] [real] NOT NULL
 )

GO

CREATE TABLE [dbo].[Points](
	[id] [int] NOT NULL PRIMARY KEY CLUSTERED,
	[Point] [geometry] NOT NULL,
)


Go
set nocount on
declare @i int
set @i=(select COUNT(1) from source)
while @i<20000000
begin
	insert into source (x,y)
	select rand(),rand()
	set @i=@i+1
end
Go
insert into points (id,point)
select id,'Point('+cast(x as varchar)+' '+cast(y as varchar)+')' from source

Go

---Queries start here
--normal T-SQL
select x,y from source where  ((x-(0.9))*(x-(0.9)))+((y-(0.9))*(y-(0.9)))<0.01*0.01

--Built-in Spatial
declare @p1 geometry = 'POINT (0.9 0.9)';
select   point from points where Point.STDistance(@p1) <0.01

--Multidimensional extension
exec Spatialquery 'x,y','K1','distance(x=0.9,y=0.9)<0.01','1=1'

--Resolved to this behind scenes
select x,y from [source] 
where [K1] in (8129,8130,8131,8134,8137,8140) 
and ((x-(0.9))*(x-(0.9)))+((y-(0.9))*(y-(0.9)))<0.01*0.01


--T-SQL with little trick
select x,y from source 
	where  x between 0.89 and 0.91 and  ((x-(0.9))*(x-(0.9)))+((y-(0.9))*(y-(0.9)))<0.01*0.01